import http from '@/utils/axios'
export default {
  //点击登录
  login(cookie, usename, pwd) {
    return http({
      url: `/UMC/UMC/${cookie}?Username=${usename}&Password=${pwd}&_model=Account&_cmd=Login`,
      method: 'post',
    })
  },
  getUMCConfig() {
    return http({ url: `/UMC/UMC.Conf`, method: 'get' })
  },
  getMqttPrams(cookie) {
    return http({ url: `/UMC/UMC/${cookie}?Mqtt&_model=Account&_cmd=Check`, method: 'get' })
  },
  getMenu(cookie, pram) {
    return http({
      url: `/UMC/UMC/${cookie}`,
      method: 'post',
      data: pram,
    })
  },
  scanQRcodeJump(cookie) {
    return http({ url: `/UMC/UMC/${cookie}?Session&_model=Account&_cmd=Check`, method: 'post' })
  },

  /**新接口*/
  getUesrPortal() {
    return http({
      url: `/management-fat-portal/portal/getCurrentPortals`,
      method: 'get',
    })
  },
  getToken(pram) {
    return http({
      url: '/oauth/oauth/token?' + pram,
      method: 'POST',
      header: { Authorization: null },
    })
  },
}
